home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD 5.bin / workbench / libs / identify.lha / Identify / identify.doc < prev    next >
Text File  |  1997-04-23  |  18KB  |  496 lines

  1. TABLE OF CONTENTS
  2.  
  3. identify.library/IdAlert
  4. identify.library/IdExpansion
  5. identify.library/IdFunction
  6. identify.library/IdHardware
  7. identify.library/IdHardwareNum
  8.  
  9. identify.library/IdAlert                              identify.library/IdAlert
  10.  
  11.    NAME
  12.         IdAlert - get description of an alert (V3)
  13.  
  14.    SYNOPSIS
  15.         Error = IdAlert(Code,TagList)
  16.         D0.l            D0.l   A0.l
  17.  
  18.         LONG IdAlert(ULONG, struct TagItem *);
  19.  
  20.         Error = IdAlertTags(Code,Tag1,...)
  21.  
  22.         LONG IdAlertTags(ULONG, ULONG,...);
  23.  
  24.    FUNCTION
  25.         Get a human readable description of the alert ('Guru') code.
  26.  
  27.    INPUTS
  28.         Code          -- (ULONG) alert code, as defined in exec/alerts.h
  29.  
  30.         TagList       -- (struct TagItem *) tags that describe further
  31.                          options:
  32.  
  33.                 IDTAG_DeadStr   -- (STRPTR) Alert type string (deadend
  34.                         or recoverable). You may skip this tag if you
  35.                         do not want to get the string.
  36.                 IDTAG_SubsysStr -- (STRPTR) String of the subsystem
  37.                         that caused the alert (CPU, exec.library, ...).
  38.                         You may skip this tag if you do not want to
  39.                         get the string.
  40.                 IDTAG_GeneralStr -- (STRPTR) General alert cause. You
  41.                         may skip this tag if you do not want to get
  42.                         the string.
  43.                 IDTAG_SpecStr   -- (STRPTR) Specified alert cause. You
  44.                         may skip this tag if you do not want to get
  45.                         the string.
  46.                 IDTAG_StrLength -- (UWORD) Maximum length of the
  47.                         string buffer, including termination. Defaults
  48.                         to 50.
  49.  
  50.    RESULT
  51.         Error         -- (LONG) error code, or 0 if everything went fine.
  52.  
  53.    NOTE
  54.         This call is guaranteed to preserve all registers except D0.
  55.  
  56.    BUGS
  57.  
  58.    SEE ALSO
  59.  
  60. identify.library/IdExpansion                      identify.library/IdExpansion
  61.  
  62.    NAME
  63.         IdExpansion - get name of expansion board (V3)
  64.  
  65.    SYNOPSIS
  66.         Error = IdExpansion(TagList)
  67.         D0.l                  A0.l
  68.  
  69.         LONG IdExpansion(struct TagItem *);
  70.  
  71.         Error = IdExpansionTags(Tag1,...)
  72.  
  73.         LONG IdExpansionTags(ULONG,...);
  74.  
  75.    FUNCTION
  76.         Gets the name and class of the expansion and it's manufacturer.
  77.  
  78.    INPUTS
  79.         TagList       -- (struct TagItem *) tags that describe further
  80.                          options:
  81.  
  82.                 IDTAG_ConfigDev -- (struct ConfigDev *) ConfigDev
  83.                         structure containing all information. You
  84.                         should use this tag if ever possible, since
  85.                         there are more possibilities to recognize and
  86.                         distinguish between a board.
  87.                 IDTAG_ManufID   -- (UWORD) Manufacturer ID if ConfigDev
  88.                         is not provided. You also have to provide
  89.                         IDTAG_ProdID!
  90.                 IDTAG_ProdID    -- (UBYTE) Product ID if ConfigDev
  91.                         is not provided. You also have to provide
  92.                         IDTAG_ManufID!
  93.                 IDTAG_ManufStr  -- (STRPTR) Pointer to a buffer space
  94.                         for the manufacturer name. You may skip this
  95.                         tag if you do not want to get this string.
  96.                 IDTAG_ProdStr   -- (STRPTR) Pointer to a buffer space
  97.                         for the product name. You may skip this tag if
  98.                         you do not want to get this string.
  99.                 IDTAG_ClassStr  -- (STRPTR) Pointer to a buffer space
  100.                         for the product class. You may skip this tag if
  101.                         you do not want to get this string.
  102.                 IDTAG_StrLength -- (UWORD) Buffer length, including
  103.                         termination. Defaults to 50.
  104.                 IDTAG_Expansion -- [V6] (struct ConfigDev **) Use this
  105.                         tag to easily traverse through the expansion
  106.                         board list. Init the pointed variable with NULL.
  107.                         After each call, you will find the current
  108.                         ConfigDev pointer in this variable. If you are
  109.                         done, this function returns IDERR_DONE and the
  110.                         variable is set to NULL. See example.
  111.  
  112.    RESULT
  113.         Error         -- (LONG) error code, or 0 if everything went fine.
  114.  
  115.    EXAMPLE
  116.         To check all expansion boards, you may use this code:
  117.  
  118.         void PrintExpansions(void)
  119.         {
  120.           struct ConfigDev *expans = NULL;
  121.           char manuf[IDENTIFYBUFLEN];
  122.           char prod[IDENTIFYBUFLEN];
  123.           char pclass[IDENTIFYBUFLEN];
  124.  
  125.           while(!IdExpansionTags(
  126.                   IDTAG_ManufStr ,&manuf,
  127.                   IDTAG_ProdStr  ,&prod,
  128.                   IDTAG_ClassStr ,&pclass,
  129.                   IDTAG_Expansion,&expans,
  130.                   TAG_DONE))
  131.           {
  132.             Printf("Current ConfigDev = 0x%08lx\n",expans);
  133.             Printf("  Manufacturer    = %s\n",manuf);
  134.             Printf("  Product         = %s\n",prod);
  135.             Printf("  Expansion class = %s\n\n",class);
  136.           }
  137.         }
  138.  
  139.    NOTE
  140.         If the manufacturer or the product is not known, the string will be
  141.         filled with its number.
  142.  
  143.         This call is guaranteed to preserve all registers except D0.
  144.  
  145.    BUGS
  146.         There are by far not all existing boards implemented. Please send
  147.         the manufacturer id and name and the products id, name and class
  148.         of all unknown boards to me. My E-Mail: "shred@chessy.aworld.de".
  149.  
  150.    SEE ALSO
  151.  
  152. identify.library/IdFunction                        identify.library/IdFunction
  153.  
  154.    NAME
  155.         IdFunction - identify function name by offset (V4)
  156.  
  157.    SYNOPSIS
  158.         Error = IdFunction(LibName,Offset,TagList)
  159.         D0.l                A0.l    D0.l   A1.l
  160.  
  161.         LONG IdFunction(STRPTR, LONG, struct TagItem *);
  162.  
  163.         Error = IdFunctionTags(LibName,Offset,Tag1,...)
  164.  
  165.         LONG IdFunctionTags(STRPTR, LONG, ULONG,...);
  166.  
  167.    FUNCTION
  168.         Decodes the offset of the provided library name into function name.
  169.  
  170.         This function requires the .fd files in a drawer with 'FD:' assigned
  171.         to it. All files must have the standard file name format, e.g.
  172.         'exec_lib.fd'.
  173.  
  174.         The appropriate .fd file will be scanned. The result will be
  175.         cached until the identify.library is removed from system.
  176.  
  177.    INPUTS
  178.         LibName       -- (STRPTR) name of the function's library, device
  179.                         or resource. All letters behind the point (and
  180.                         the point itself) are optional. The name is
  181.                         case sensitive.
  182.  
  183.                         Examples: 'exec.library', 'dos', 'cia.resource'.
  184.  
  185.         Offset        -- (LONG) offset of the function. It must be a
  186.                         multiple of 6. You do not need to provide the
  187.                         minus sign.
  188.  
  189.                         Examples: -456, 60
  190.  
  191.         TagList       -- (struct TagItem *) tags that describe further
  192.                         options:
  193.  
  194.                 IDTAG_FuncNameStr -- (STRPTR) Buffer where the function
  195.                         name will be copied into.
  196.  
  197.                 IDTAG_StrLength -- (UWORD) Maximum length of the
  198.                         string buffer, including termination. Defaults
  199.                         to 50.
  200.  
  201.    RESULT
  202.         Error         -- (LONG) error code, or 0 if everything went fine.
  203.  
  204.    NOTE
  205.         This call is guaranteed to preserve all registers except D0.
  206.  
  207.    BUGS
  208.         Every line in the .fd file must have a maximum of 98 characters.
  209.         Otherwise the internal offset table may be corrupted (but the
  210.         system won't be harmed). Anyhow, this should be no problem.
  211.  
  212.    SEE ALSO
  213.  
  214. identify.library/IdHardware                        identify.library/IdHardware
  215.    NAME
  216.         IdHardware - get information about the system, string (V3)
  217.  
  218.    SYNOPSIS
  219.         String = IdHardware(Type,TagList)
  220.          D0.l               D0.l   A0.l
  221.  
  222.         STRPTR IdHardware(ULONG, struct TagItem *);
  223.  
  224.         String = IdHardwareTags(Type,Tag1,...)
  225.  
  226.         STRPTR IdHardwareTags(ULONG, ULONG,...);
  227.  
  228.    FUNCTION
  229.         Gets information about the current system environment. The result
  230.         is returned as read only string. This function is fully DraCo
  231.         compatible!
  232.  
  233.    INPUTS
  234.         Type          -- (ULONG) Information type. These types are known:
  235.  
  236.                 IDHW_SYSTEM     -- What system is used?
  237.                         (e. g. "Amiga 4000")
  238.  
  239.                 IDHW_CPU        -- What kind of CPU is available?
  240.                         (e. g. "68060")
  241.  
  242.                 IDHW_FPU        -- What kind of FPU is available?
  243.                         (e. g. "68060")
  244.  
  245.                 IDHW_MMU        -- What kind of MMU is available?
  246.                         (e. g. "68060")
  247.  
  248.                 IDHW_OSVER      -- What OS version is used?
  249.                         (e.g. "V39.106")
  250.  
  251.                 IDHW_EXECVER    -- What exec version is used?
  252.                         (e.g. "V39.47")
  253.  
  254.                 IDHW_WBVER      -- What WorkBench version is used?
  255.                         (e.g. "V39.29")
  256.  
  257.                 IDHW_ROMSIZE    -- Size of AmigaOS ROM
  258.                         (e.g. "512KB")
  259.  
  260.                 IDHW_CHIPSET    -- What Chipset is available?
  261.                         (e.g. "AGA")
  262.  
  263.                 IDHW_GFXSYS     -- What Graphic OS is used?
  264.                         (e.g. "CyberGraphX")
  265.  
  266.                 IDHW_CHIPRAM    -- Size of complete Chip RAM
  267.                         (e.g. "2MB")
  268.  
  269.                 IDHW_FASTRAM    -- Size of complete Fast RAM
  270.                         (e.g. "12MB")
  271.  
  272.                 IDHW_RAM        -- Size of complete System RAM
  273.                         (e.g. "14MB")
  274.  
  275.                 IDHW_SETPATCHVER -- [V4] Version of current SetPatch
  276.                         (e.g. "V40.14")
  277.  
  278.                 IDHW_AUDIOSYS   -- [V5] What Audio OS is used?
  279.                         (e.g. "AHI")
  280.  
  281.                 IDHW_OSNR       -- [V5] What AmigaOS is used?
  282.                         (e.g. "3.1")
  283.  
  284.                 IDHW_VMMCHIPRAM -- [V5] Size of virtual Chip RAM
  285.                         (e.g. "0")
  286.  
  287.                 IDHW_VMMFASTRAM -- [V5] Size of virtual Fast RAM
  288.                         (e.g. "40MB")
  289.  
  290.                 IDHW_VMMRAM     -- [V5] Size of total virtual RAM
  291.                         (e.g. "40MB")
  292.  
  293.                 IDHW_PLNCHIPRAM -- [V5] Size of non-virtual Chip RAM
  294.                         (e.g. "2MB")
  295.  
  296.                 IDHW_PLNFASTRAM -- [V5] Size of non-virtual Fast RAM
  297.                         (e.g. "12MB")
  298.  
  299.                 IDHW_PLNRAM     -- [V5] Size of total non-virtual RAM
  300.                         (e.g. "14MB")
  301.  
  302.                 IDHW_VBR        -- [V6] Vector Base Register contents
  303.                         (e.g. "0x0806C848")
  304.  
  305.                 IDHW_LASTALERT  -- [V6] Last Alert code
  306.                         (e.g. "80000003")
  307.  
  308.                 IDHW_VBLANKFREQ -- [V6] VBlank frequency (see execbase.h)
  309.                         (e.g. "50 Hz")
  310.  
  311.                 IDHW_POWERFREQ  -- [V6] Power supply frequency (see execbase.h)
  312.                         (e.g. "50 Hz")
  313.  
  314.                 IDHW_ECLOCK     -- [V6] System E clock frequency
  315.                         (e.g. "709379 Hz")
  316.  
  317.                 IDHW_SLOWRAM    -- [V6] A500/A2000 "Slow" RAM expansion
  318.                         (e.g. "512KB")
  319.  
  320.                 IDHW_GARY       -- [V6] GARY revision
  321.                         (e.g. "Normal")
  322.  
  323.                 IDHW_RAMSEY     -- [V6] RAMSEY revision
  324.                         (e.g. "F")
  325.  
  326.                 IDHW_BATTCLOCK  -- [V6] Battery backed up clock present?
  327.                         (e.g. "Found")
  328.  
  329.         TagList       -- (struct TagItem *) tags that describe further
  330.                          options. Currently, there are none. You may
  331.                          provide NULL.
  332.  
  333.    RESULT
  334.         String        -- (STRPTR) String containing the desired
  335.                 information, or NULL if not available. Note that
  336.                 all strings are READ ONLY!
  337.  
  338.    NOTE
  339.         This call is guaranteed to preserve all registers except D0.
  340.  
  341.    BUGS
  342.         Identify ignores any changes to the base of the upper values
  343.         (e.g. if Virtual Memory is added after startup of identify).
  344.         Workaround: remove identify from memory (e.g. avail flush).
  345.  
  346.    SEE ALSO
  347.         IdHardwareNum()
  348.  
  349. identify.library/IdHardwareNum                  identify.library/IdHardwareNum
  350.    NAME
  351.         IdHardwareNum - get information about the system, numerical (V6)
  352.  
  353.    SYNOPSIS
  354.         Result = IdHardwareNum(Type,TagList)
  355.          D0.l                  D0.l   A0.l
  356.  
  357.         ULONG IdHardwareNum(ULONG, struct TagItem *);
  358.  
  359.         Result = IdHardwareNumTags(Type,Tag1,...)
  360.  
  361.         ULONG IdHardwareNumTags(ULONG, ULONG,...);
  362.  
  363.    FUNCTION
  364.         Gets information about the current system environment. The result
  365.         is returned numerical. This function is fully DraCo compatible!
  366.  
  367.    INPUTS
  368.         Type          -- (ULONG) Information type. These types are known
  369.                 (see include file and NOTE for detailed description):
  370.  
  371.                 IDHW_SYSTEM     -- What system is used?
  372.                         (include file: IDSYS_...)
  373.  
  374.                 IDHW_CPU        -- What kind of CPU is available?
  375.                         (include file: IDCPU_...)
  376.  
  377.                 IDHW_FPU        -- What kind of FPU is available?
  378.                         (include file: IDFPU_...)
  379.  
  380.                 IDHW_MMU        -- What kind of MMU is available?
  381.                         (include file: IDMMU_...)
  382.  
  383.                 IDHW_OSVER      -- What OS version is used?
  384.                         (version, revision)
  385.  
  386.                 IDHW_EXECVER    -- What exec version is used?
  387.                         (version, revision)
  388.  
  389.                 IDHW_WBVER      -- What WorkBench version is used?
  390.                         (version, revision; 0 if not available)
  391.  
  392.                 IDHW_ROMSIZE    -- Size of AmigaOS ROM
  393.                         (size in bytes)
  394.  
  395.                 IDHW_CHIPSET    -- What Chipset is available?
  396.                         (include file: IDCS_...)
  397.  
  398.                 IDHW_GFXSYS     -- What Graphic OS is used?
  399.                         (include file: IDGOS_...)
  400.  
  401.                 IDHW_CHIPRAM    -- Size of complete Chip RAM
  402.                         (size in bytes)
  403.  
  404.                 IDHW_FASTRAM    -- Size of complete Fast RAM
  405.                         (size in bytes)
  406.  
  407.                 IDHW_RAM        -- Size of complete System RAM
  408.                         (size in bytes)
  409.  
  410.                 IDHW_SETPATCHVER -- Version of current SetPatch
  411.                         (version, revision; 0 if not available)
  412.  
  413.                 IDHW_AUDIOSYS   -- What Audio OS is used?
  414.                         (include file: IDAOS_...)
  415.  
  416.                 IDHW_OSNR       -- What AmigaOS is used?
  417.                         (include file: IDOS_...)
  418.  
  419.                 IDHW_VMMCHIPRAM -- Size of virtual Chip RAM
  420.                         (size in bytes)
  421.  
  422.                 IDHW_VMMFASTRAM -- Size of virtual Fast RAM
  423.                         (size in bytes)
  424.  
  425.                 IDHW_VMMRAM     -- Size of total virtual RAM
  426.                         (size in bytes)
  427.  
  428.                 IDHW_PLNCHIPRAM -- Size of non-virtual Chip RAM
  429.                         (size in bytes)
  430.  
  431.                 IDHW_PLNFASTRAM -- Size of non-virtual Fast RAM
  432.                         (size in bytes)
  433.  
  434.                 IDHW_PLNRAM     -- Size of total non-virtual RAM
  435.                         (size in bytes)
  436.  
  437.                 IDHW_VBR        -- Vector Base Register contents
  438.                         (address)
  439.  
  440.                 IDHW_LASTALERT  -- Last Alert code
  441.                         (ULONG, 0xFFFFFFFF: no last alert yet)
  442.  
  443.                 IDHW_VBLANKFREQ -- VBlank frequency (see execbase.h)
  444.                         (ULONG, Unit Hertz)
  445.  
  446.                 IDHW_POWERFREQ  -- Power supply frequency (see execbase.h)
  447.                         (ULONG, Unit Hertz)
  448.  
  449.                 IDHW_ECLOCK     -- System E clock frequency
  450.                         (ULONG, Unit Hertz)
  451.  
  452.                 IDHW_SLOWRAM    -- A500/A2000 "Slow" RAM expansion
  453.                         (size in bytes)
  454.  
  455.                 IDHW_GARY       -- GARY revision
  456.                         (include file: IDGRY_...)
  457.  
  458.                 IDHW_RAMSEY     -- RAMSEY revision
  459.                         (include file: IDRSY_...)
  460.  
  461.                 IDHW_BATTCLOCK  -- Battery backed up clock present?
  462.                         (BOOL)
  463.  
  464.         TagList       -- (struct TagItem *) tags that describe further
  465.                          options. Currently, there are none. You may
  466.                          provide NULL.
  467.  
  468.    RESULT
  469.         Result        -- (ULONG) Numerical result containing the desired
  470.                 information.
  471.  
  472.    NOTE
  473.         If you queried a version, you'll find the version in the *lower*
  474.         UWORD (because it is more important) and the revision in the
  475.         *upper* UWORD.
  476.  
  477.         All memory sizes are always in bytes.
  478.  
  479.         Boolean results are ==0 for FALSE, !=0 for TRUE.
  480.  
  481.         If you have to look up the result in the include file, you might
  482.         also get a numerical result that is beyond the maximum value you'll
  483.         find there. Be prepared for it! In this case, just print "not known"
  484.         or anything similar, or use the IdHardware() result.
  485.  
  486.         This call is guaranteed to preserve all registers except D0.
  487.  
  488.    BUGS
  489.         Identify ignores any changes to the base of the upper values
  490.         (e.g. if Virtual Memory is added after startup of identify).
  491.         Workaround: remove identify from memory (e.g. avail flush).
  492.  
  493.    SEE ALSO
  494.         IdHardware()
  495.  
  496.